using Auth.Application.DTO.Input;
using Auth.Application.DTO.Output;
using Auth.Domain.Entities;
using Auth.Result;

namespace Auth.Application.Services
{
    /// <summary>
    /// 认证服务接口
    /// </summary>
    public interface IAuthService
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="loginInput">登录信息</param>
        /// <returns>登录结果</returns>
        ApiResult<LoginOutput> Login(LoginInput loginInput);

        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="registerInput">注册信息</param>
        /// <returns>注册结果</returns>
        ApiResult<int> Register(RegisterInput registerInput);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>用户信息</returns>
        ApiResult<UserOutput> GetUserInfo(long userId);

        /// <summary>
        /// 获取所有用户
        /// </summary>
        /// <returns>用户列表</returns>
        ApiPaging<UserOutput> GetAllUsers(PageInput input);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="oldPassword">旧密码</param>
        /// <param name="newPassword">新密码</param>
        /// <returns>操作结果</returns>
        ApiResult ChangePassword(long userId, string oldPassword, string newPassword);
        /// <summary>
        /// 显示用户数据
        /// </summary>
        /// <returns></returns>
        ApiResult<List<ShowUserDTO>> ShowUserData();
  
        /// <summary>
        /// 生成JWT令牌
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <returns>JWT令牌</returns>
        string GenerateJwtToken(UserModel user);
    }
} 